<?php
	addUebung($_POST['uebNr'],$_POST['uebDatum'],$_POST['uebBeginn']);
	function addUebung($uebnr,$date,$beginn){
		include("db.php");
		$sqlUebung = "INSERT INTO t_uebung (ueb_nr,ueb_datum,ueb_beginn) VALUES ('".$uebnr."','".$date."','".$beginn."')";
		$db->query($sqlUebung);
		$sqlid = "SELECT * FROM t_uebung ORDER BY ueb_id DESC LIMIT 1";
		$resid = $db->query($sqlid);
		$id = $resid->fetch_assoc();
		header("Location: ../lauf.php?ueb_id=".$id['ueb_id']); 
	}
?>